def odd_even_list(head):
    if not head: return head
    odd, even, even_head = head, head.next, head.next
    while odd.next and even.next:
        odd.next = odd.next.next
        even.next = even.next.next
        odd = odd.next
        even = even.next
    odd.next = even_head
    return head
